package simple.server;

import simple.other.MyClient;

import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import java.net.URL;

public class Test {
    public static void main(String[] args) throws Exception {
        URL wsdlUrl = new URL("http://localhost:9001/Hello?wsdl");
        // targetNamespace="http://server.simple/" name="SimpleServerService"
        Service s = Service.create(wsdlUrl,
                new QName("http://server.simple/", "HelloServiceService"));
        MyClient client = s.getPort(
                new QName("http://server.simple/",
                        "HelloServicePort"),
                MyClient.class);
        System.out.println(client.hi());
    }
}
